<template>
    <input-select :id="id" :styles="styles" :options="options" :index="index"  isChange="Y" :data="data"  @input="changeData" ></input-select>
</template>
<script>
import InputSelect  from '../input/input-select'
export default {
    props:['id','styles','value','data','index','appid'],
    name: "wszg-select",
    components: {
        InputSelect
    },
     data(){
        return{
            options:[]
        }
    },
    created(){
        this.$post("bygex","/byg/funeral/getLtSelect",{type:'卫生纸棺'}).then(data=>{
            this.options=[];
            for(let i=1;i<data.length;i++){
                this.options.push(data[i])
            }
        })
    },
    methods:{
        changeData(data){
            let datas=JSON.parse(data);
            datas.addType="string";
            datas.itemType='卫生纸棺';
            this.$emit("input",data);
            this.$emit("funeralItemSelectEvent",JSON.stringify(datas))
        }
    }
}
</script>